#include <stdio.h>
#include "Definitions.h"
#include "Simulator.h"
#include "Outports.h"
#include "Inports.h"
#include "Controllers.h"
#include "Signals.h"
#include "Registers.h"
#include "Tracers.h"
#include "Displays.h"
#include "OutportDynamicList.h"

using namespace std;









void Register_paddle_location_y::Evaluate(void)
{
      switch(Simulator::controller_ctrl_paddle->CurrentControlStep)
      {
      case 0:
    Debug::Assert(Simulator::outPort_test_paddle_ball_incomming->Cycle == Simulator::CurrentCycle);
    if (Simulator::outPort_test_paddle_ball_incomming->Value->Equals(this->Constant_1))
    {
        this->Value_binaryexpression66 = Integer::One;
    }
    else
    {
        this->Value_binaryexpression66 = Integer::Zero;
    }
    Simulator::signal_paddle_new_location_y->Evaluate();
    if (Integer::Zero->NotEquals(this->Value_binaryexpression66))
    {
        this->Value_ternaryexpression69->ValueCopy(Simulator::signal_paddle_new_location_y->Value);
    }
    else
    {
        this->Value_ternaryexpression69->ValueCopy(Simulator::register_paddle_location_y->StoredValue);
    }
    this->Value->ValueCopy(this->Value_ternaryexpression69);
        break;
      }
}

void Register_paddle_location_y::Initialize(void)
{
    this->Value = new Integer(16, true);
    this->Constant_1 = new Integer(2, "1", false);
    this->Value_binaryexpression66 = new Integer(1, false);
    this->Value_ternaryexpression69 = new Integer(16, true);
    this->StoredValue = new Integer(16, true);
}

void Register_paddle_location_y::Tick(void)
{
    this->StoredValue->ValueCopy(this->Value);
}

